package design_1_factory.demo3;


import design_1_factory.demo3.factory.QQAbstractFactory;
import design_1_factory.demo3.factory.QQFactoryProducer;

/**
 * 调用简单工厂方法demo
 *
 * <p>
 * 使用场景：
 * </P>
 *
 * @author wangsong
 * @email 1720696548@qq.com
 * @date 2022/1/18 11:41
 */
public class QQFactoryDemo {

	public static void main(String[] args) {
		// 获取工厂
		QQAbstractFactory a = QQFactoryProducer.getFactory("A");
		QQAbstractFactory b = QQFactoryProducer.getFactory("B");
		QQAbstractFactory c = QQFactoryProducer.getFactory("C");

		// 构建皮肤1
		System.out.println(a.background("A1").background()
				+ b.border("B1").border()
				+ c.typeface("C1").typeface()
		);
		// 构建皮肤2
		System.out.println(a.background("A2").background()
				+ b.border("B2").border()
				+ c.typeface("C1").typeface()
		);
		// 构建皮肤3
		System.out.println(a.background("A3").background()
				+ b.border("B2").border()
				+ c.typeface("C3").typeface()
		);
		// 构建其他皮肤等


	}
}